import { Level, wrapToPayLoad } from "~/server/utils/convention";

export default defineEventHandler(async (_event): Promise<ReqPayLoad<CourseInfoType[]>> => {
  const storage = useStorage("data");
  const infos: CourseInfoType[] = [
    {
      level: Level.beginner,
      title: "python入门",
      content: "python3入门机器学习 经典算法与应用",
      img: "/img/1-270x160.png",
      href: "/series-python/video/1",
      price: 9.9,
    },
    {
      level: Level.junior,
      title: "python初级",
      content: "python Flask入门与进阶 开发电影网站",
      img: "/img/2-270x160.png",
      href: "/series-python/video/2",
      price: 19.9,
    },
    {
      level: Level.middle,
      title: "python中级",
      content: "python Flask构建微信小程序",
      img: "/img/3-270x160.png",
      href: "/series-python/video/3",
      price: 29.9,
    },
    {
      level: Level.senior,
      title: "python高级",
      content: "python 数据开放平台实战",
      img: "/img/4-270x160.png",
      href: "/series-python/video/4",
      price: 39.9,
    },
  ];
  return wrapToPayLoad(infos);
});
